import axios from 'axios'
function request(url, param, method){
    let urlNew = window._CONFIG.contextPath + url;
    if (!!method &&  method.toLowerCase()== "get") {// 如果设置了请求方式为get
        return axios.get(urlNew, {
            params: param,
            headers: {

            }
        });
    } else {// 默认为post请求
        return axios.post(urlNew, param, {
            headers: {
                
            }
        });
    }
}
export default request;
